Generally, a number used in a computer system requires a memory allocation specified by the operating system. In some cases, it is important to conserve memory by representing that number in a memory space smaller than that which the operating system defines. Such representations are especially valuable in applications that utilize large quantities of data. The process of reducing required memory is referred to as compression, and the opposite function, that of recovering the number to its original format, is called decompression.
Floating point numbers have been compressed using the subtract and multiply instructions to bias, as well as to scale a floating point number so that its value is in a desired range. The resulting floating point number is then converted to an integer. Due to the multiplication instructions, this technique is relatively slow.
Another technique is to separately truncate and store the exponent and the mantissa fields of the floating point number. The algebraic sign bit is also separately stored. Since not all combinations of bits in the compressed format represent floating point numbers in a desired range, the number of bits required is more than necessary. Also, two separate field store operations for compression, as well as two separate field extractions for decompression, are required--one each for the exponent and for the mantissa. There is also a store and a retrieve operation for the algebraic sign.
In order to better meet the dual requirements of reduced memory utilization which permits more data to be loaded into memory and of higher speed which increases application performance, a need exists for further improvements in methods of compressing and decompressing floating point numbers in computer systems.